package com.example.leetcode.bfs;

import com.example.leetcode.bfs.common.BFSUtils;
import com.example.leetcode.tree.common.TreeNode;
import com.example.leetcode.tree.common.TreeUtils;

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution513 {
    public int findBottomLeftValue(TreeNode root) {
        return BFSUtils.findBottomLeftValue(root);
    }
}

public class leetcode513 {
    public static void main(String[] args) {
        Solution513 solution513 = new Solution513();
        Integer[] nums = {1,2,3,4,null,5,6,null,null,7};
        solution513.findBottomLeftValue(TreeUtils.generateLeetcodeTree(nums));
    }
}
